package cn.edu.cug.cs.gtl.renders.openinventor.basics;

import cn.edu.cug.cs.gtl.apis.render.basics.Line;
import com.openinventor.inventor.SbLine;
public class LineImpl implements Line {
    protected SbLine nativeObject = new SbLine();

    public LineImpl(SbLine nativeObject) {
        this.nativeObject = nativeObject;
    }

    @Override
    public Object getNativeObject() {
        return this.nativeObject;
    }

    @Override
    public boolean attach(Object nativeObject) {
        if(nativeObject instanceof SbLine){
            this.nativeObject = (SbLine) nativeObject;
            return true;
        }
        return false;
    }

    @Override
    public Object detach() {
        SbLine r = this.nativeObject;
        this.nativeObject=null;
        return r;
    }
}
